<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="学生姓名" prop="studentName">
        <el-input
          v-model="queryParams.studentName"
          placeholder="请输入学生姓名"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学生年龄" prop="studentAge">
        <el-input
          v-model="queryParams.studentAge"
          placeholder="请输入学生年龄"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学生学历" prop="studentEducation">
        <el-input
          v-model="queryParams.studentEducation"
          placeholder="请输入学生学历"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="班级名称" prop="className">
        <el-input
          v-model="queryParams.className"
          placeholder="请输入班级名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="校区" prop="schoolPosition">
        <el-input
          v-model="queryParams.schoolPosition"
          placeholder="请输入校区"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学校" prop="school">
        <el-input
          v-model="queryParams.school"
          placeholder="请输入学校"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="学生电话" prop="studentPhone">
        <el-input
          v-model="queryParams.studentPhone"
          placeholder="请输入学生电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="父母电话" prop="parentsPhone">
        <el-input
          v-model="queryParams.parentsPhone"
          placeholder="请输入父母电话"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['system:studentManage:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['system:studentManage:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['system:studentManage:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:studentManage:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
      <el-button
        type="primary"
        size="mini"
        icon="el-icon-caret-bottom"
        plain
        :disabled="multiple"
        @click="handleStatus">状态修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          size="mini"
          icon="el-icon-refresh"
          plain
          :disabled="single"
          @click="handleChangeClass">留级转班</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          size="mini"
          icon="el-icon-circle-plus"
          plain
          :disabled="single"
          @click="handleTeachTrack">添加跟踪</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="studentManageList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="主键id:学生id" align="center" prop="id" />
      <el-table-column label="学生姓名" align="center" prop="studentName" />
      <el-table-column label="学生年龄" align="center" prop="studentAge" />
      <el-table-column label="班级名称" align="center" prop="className" />
      <el-table-column label="校区" align="center" prop="schoolPosition">
        <template slot-scope="scope">
          <span>{{ scope.row.schoolPosition == "0" ? '武汉' : scope.row.schoolPosition == "1" ? '成都' : scope.row.schoolPosition == "2" ? '长沙' : '重庆'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="学生电话" align="center" prop="studentPhone" />
      <el-table-column label="学生状态" align="center" prop="studentStatus">
        <template slot-scope="scope">
          <span>{{ scope.row.studentStatus == 0 ? '毕业未就业' : scope.row.studentStatus == 1 ? '未毕业' : scope.row.studentStatus == 2 ? '毕业已就业' : '留级在读'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="模拟面试" align="center" prop="interviewStatus">
        <template slot-scope="scope">
          <span>{{ scope.row.interviewStatus == 0 ? '未测试' : scope.row.interviewStatus == 1 ? '测试通过' : '测试不及格'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="结业考试" align="center" prop="examinationStatus">
        <template slot-scope="scope">
          <span>{{ scope.row.examinationStatus == 0 ? '未测试' : scope.row.examinationStatus == 1 ? '测试通过' : '测试不及格'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-sort"
            @click="handleShowTeachTrack(scope.row)"
            v-hasPermi="['system:studentManage:track']"
          >跟踪</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-star-on"
            @click="handleFocus(scope.row)"
            v-hasPermi="['system:studentManage:focus']"
          >关注</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['system:studentManage:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:studentManage:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改学生管理对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="学生姓名" prop="studentName">
          <el-input v-model="form.studentName" placeholder="请输入学生姓名" />
        </el-form-item>
        <el-form-item label="学生性别" prop="studentSex">
          <el-select v-model="form.studentSex" class="m-2" placeholder="请选择学生性别" size="large">
            <el-option label="女" :value="0"></el-option>
            <el-option label="男" :value="1"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="学生年龄" prop="studentAge">
          <el-input v-model="form.studentAge" placeholder="请输入学生年龄" />
        </el-form-item>
        <el-form-item label="学生学历" prop="studentEducation">
          <el-input v-model="form.studentEducation" placeholder="请输入学生学历" />
        </el-form-item>
<!--        <el-form-item label="班级名称" prop="className">-->
<!--          <el-input v-model="form.className" placeholder="请输入班级名称" />-->
<!--        </el-form-item>-->
        <el-form-item label="班级名称" prop="className">
          <el-select v-model="form.classId" class="m-2" placeholder="请选择班级" size="large">
            <el-option
              v-for="item in classManageList"
              :key="item.id"
              :label="item.className"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="学校" prop="school">
          <el-input v-model="form.school" placeholder="请输入学校" />
        </el-form-item>
        <el-form-item label="学生电话" prop="studentPhone">
          <el-input v-model="form.studentPhone" placeholder="请输入学生电话" />
        </el-form-item>
        <el-form-item label="父母电话" prop="parentsPhone">
          <el-input v-model="form.parentsPhone" placeholder="请输入父母电话" />
        </el-form-item>
        <el-form-item label="学生状态" prop="studentStatus">
          <el-select v-model="form.studentStatus" class="m-2" placeholder="请选择学生状态" size="large">
            <el-option label="毕业未已就业" :value="0"></el-option>
            <el-option label="未毕业" :value="1"></el-option>
            <el-option label="毕业已就业" :value="2"></el-option>
            <el-option label="留级在读" :value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="模拟面试" prop="interviewStatus">
          <el-select v-model="form.interviewStatus" class="m-2" placeholder="请选择模拟面试状态" size="large">
            <el-option label="未测试" :value="0"></el-option>
            <el-option label="测试通过" :value="1"></el-option>
            <el-option label="测试不及格" :value="2"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="结业考试" prop="examinationStatus">
          <el-select v-model="form.examinationStatus" class="m-2" placeholder="请选择结业考试状态" size="large">
            <el-option label="未测试" :value="0"></el-option>
            <el-option label="测试通过" :value="1"></el-option>
            <el-option label="测试不及格" :value="2"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 修改学生状态 -->
    <el-dialog :title="updateTitle" :visible.sync="openUpdate" width="500px" append-to-body>
      <el-form ref="updateStatusForm" :model="updateStatusForm" :rules="rules" label-width="80px">
        <el-form-item label="学生状态" prop="studentStatus">
          <el-select v-model="updateStatusForm.studentStatus" class="m-2" placeholder="请选择学生状态" size="large">
            <el-option label="毕业未已就业" :value="0"></el-option>
            <el-option label="未毕业" :value="1"></el-option>
            <el-option label="毕业已就业" :value="2"></el-option>
            <el-option label="留级在读" :value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="模拟面试" prop="interviewStatus">
          <el-select v-model="updateStatusForm.interviewStatus" class="m-2" placeholder="请选择模拟面试状态" size="large">
            <el-option label="未测试" :value="0"></el-option>
            <el-option label="测试通过" :value="1"></el-option>
            <el-option label="测试不及格" :value="2"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="结业考试" prop="examinationStatus">
          <el-select v-model="updateStatusForm.examinationStatus" class="m-2" placeholder="请选择结业考试状态" size="large">
            <el-option label="未测试" :value="0"></el-option>
            <el-option label="测试通过" :value="1"></el-option>
            <el-option label="测试不及格" :value="2"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitUpdateForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 留级转班 -->
    <el-dialog :title="changeTitle" :visible.sync="openChange" width="500px" append-to-body>
      <el-form ref="changeClassForm" :model="changeClassForm" :rules="rules" label-width="80px">
        <el-form-item label="学生姓名" prop="studentName">
          <el-input disabled="true" v-model="changeClassForm.studentName" placeholder="请输入学生姓名"/>
        </el-form-item>
        <el-form-item label="班级名称" prop="className">
          <el-select v-model="changeClassForm.classId" class="m-2" placeholder="请选择班级" size="large">
            <el-option
              v-for="item in classManageList"
              :key="item.id"
              :label="item.className"
              :value="item.id"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="学生状态" prop="studentStatus">
          <el-select v-model="changeClassForm.studentStatus" class="m-2" placeholder="请选择学生状态" size="large">
            <el-option label="毕业未已就业" :value="0"></el-option>
            <el-option label="未毕业" :value="1"></el-option>
            <el-option label="毕业已就业" :value="2"></el-option>
            <el-option label="留级在读" :value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
        <el-input
          type="textarea"
          :rows="2"
          placeholder="请输入内容"
          v-model="changeClassForm.remark">
        </el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitStudentForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加跟踪 -->
    <el-dialog :title="teachTrackTitle" :visible.sync="openTeachTrack" width="500px" append-to-body>
      <el-form ref="teachTrackForm" :model="teachTrackForm" :rules="rules" label-width="80px">

        <el-form-item label="问题类型" prop="type">
          <el-select v-model="teachTrackForm.type" class="m-2" placeholder="请选择出现的问题类型" size="large">
            <el-option label="违纪-看电视" :value="0"></el-option>
            <el-option label="违纪-打游戏" :value="1"></el-option>
            <el-option label="跟踪日常谈话" :value="2"></el-option>
            <el-option label="跟踪迟到" :value="3"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="发生时间" prop="traceTime">
          <el-date-picker clearable
                          v-model="teachTrackForm.traceTime"
                          type="date"
                          value-format="yyyy-MM-dd"
                          placeholder="请选择创建时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="扣除分数" prop="deduction">
          <el-input v-model="teachTrackForm.deduction" placeholder="请输入扣分"/>
        </el-form-item>
        <el-form-item label="问题描述" prop="descrition">
          <el-input
            type="textarea"
            :rows="2"
            placeholder="请输入内容"
            v-model="teachTrackForm.descrition">
          </el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitTeachTrackForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

<!--    跟踪信息-->
    <el-dialog :title="trackTitle" :visible.sync="openTrack">
      <el-table :data="teachTrackList">
        <el-table-column property="traceTime" label="日期" width="150"></el-table-column>
        <el-table-column property="studentName" label="学生姓名" width="200"></el-table-column>
        <el-table-column property="descrition" label="问题描述"></el-table-column>
      </el-table>
    </el-dialog>

    <!-- 加入重点关注 -->
    <el-dialog :title="focusTitle" :visible.sync="openFocus" width="500px" append-to-body>
      <el-form ref="focusForm" :model="focusForm" :rules="rules" label-width="80px">
        <el-form-item label="学生姓名" prop="studentName">
          <el-input disabled="true" v-model="focusForm.studentName" placeholder="请输入学生姓名"/>
        </el-form-item>
        <el-form-item label="负责老师" prop="teacherName">
          <el-input v-model="focusForm.teacherName" placeholder="请输入老师姓名"/>
        </el-form-item>
        <el-form-item label="困难系数" prop="hardLevel">
          <el-select v-model="focusForm.hardLevel" class="m-2" placeholder="请选择困难系数" size="large">
            <el-option label="不太困难" :value="0"></el-option>
            <el-option label="一般困难" :value="1"></el-option>
            <el-option label="很困难" :value="2"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitFocusForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
import {
  listStudentManage,
  getStudentManage,
  delStudentManage,
  addStudentManage,
  updateStudentManage,
  getClassManageInfo,
  updateStudentStatus,
  getTraces
} from "@/api/system/studentManage";
import {addRecords} from "@/api/system/records";
import {addTrace} from "@/api/system/trace";
import {addFocus} from "@/api/system/focus";

export default {
  name: "StudentManage",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 学生管理表格数据
      studentManageList: [],
      // 班级管理表格数据
      classManageList: [],
      //跟踪学生信息表格数据
      teachTrackList: [],
      // 弹出层标题
      title: "",
      updateTitle: "",
      changeTitle: "",
      teachTrackTitle: "",
      trackTitle: "",
      focusTitle: "",
      // 是否显示弹出层
      open: false,
      // 是否显示弹出层
      openUpdate: false,
      // 是否显示弹出层
      openChange: false,
      openTeachTrack: false,
      openTrack: false,
      openFocus: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        studentName: null,
        studentAge: null,
        studentSex: null,
        studentEducation: null,
        className: null,
        schoolPosition: null,
        school: null,
        studentPhone: null,
        parentsPhone: null,
        studentStatus: null,
        interviewStatus: null,
        examinationStatus: null
      },
      // 表单参数
      form: {},
      //修改学生状态表单参数
      updateStatusForm: {},
      //留级转班表单参数
      changeClassForm: {},
      //添加跟踪表单
      teachTrackForm: {},
      //加入重点关注表单
      focusForm: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
    this.getClassList();
  },
  methods: {
    /** 查询学生管理列表 */
    getList() {
      this.loading = true;
      listStudentManage(this.queryParams).then(response => {
        this.studentManageList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    /** 查询班级管理列表 */
    getClassList() {
      this.loading = true;
      getClassManageInfo().then(response => {
        this.classManageList = response.rows;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.openUpdate = false;
      this.openChange = false;
      this.openTeachTrack = false;
      this.openFocus = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        studentName: null,
        studentAge: null,
        studentSex: null,
        studentEducation: null,
        classId: null,
        className: null,
        schoolPosition: null,
        school: null,
        studentPhone: null,
        parentsPhone: null,
        studentStatus: null,
        interviewStatus: null,
        examinationStatus: null
      };
      this.updateStatusForm = {
        ids: [],
        studentStatus: null,
        interviewStatus: null,
        examinationStatus: null
      };
      this.changeClassForm = {
        studentId: null,
        studentName: null,
        classId: null,
        className: null,
        studentStatus: null,
        remark: null,
      };
      this.teachTrackForm = {
        id: null,
        studentId: null,
        classId: null,
        className: null,
        studentName: null,
        type: null,
        deduction: null,
        traceTime: null,
        traceTimes: null,
        traceTeacher: null,
        descrition: null
      };
      this.focusForm = {
        id: null,
        teacherName: null,
        classId: null,
        className: null,
        studentName: null,
        studentStatus: null,
        hardLevel: null,
        mockTest: null,
        endTest: null
      };
      this.resetForm("form");
      this.resetForm("updateStatusForm");
      this.resetForm("changeClassForm");
      this.resetForm("teachTrackForm");
      this.resetForm("focusForm");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
      this.getClassList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加学生管理";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getStudentManage(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改学生管理";
      });
    },
    /** 跟踪按钮操作 */
    handleShowTeachTrack(row) {
      this.reset();
      const id = row.id || this.ids
      getTraces(id).then(response => {
        this.teachTrackList = response.data;
        this.openTrack = true;
        this.trackTitle = "跟踪历史";
      });
    },
    /** 添加关注按钮操作 */
    handleFocus(row) {
      this.reset();
      const id = row.id || this.ids
      getStudentManage(id).then(response => {
        this.focusForm.studentId = id;
        this.focusForm.classId = response.data.classId;
        this.focusForm.studentName = response.data.studentName;
        this.focusForm.className = response.data.className;
        this.openFocus = true;
        this.focusTitle = "加入重点关注";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateStudentManage(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
              this.getClassList();
            });
          } else {
            addStudentManage(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
              this.getClassList();
            });
          }
        }
      });
    },
    /** 修改学生状态提交按钮 */
    submitUpdateForm(row){
      this.$refs["updateStatusForm"].validate(valid => {
        const ids = row.id || this.ids;
        this.updateStatusForm.ids = ids;
          if(valid){
            updateStudentStatus(this.updateStatusForm).then(response=>{
              this.$modal.msgSuccess("修改成功");
              this.openUpdate = false;
              this.getList();
              this.getClassList();
            })
          }
      });
    },
    /** 留级转班提交按钮 */
    submitStudentForm(){
      this.$refs["changeClassForm"].validate(valid => {
        if(valid){
          addRecords(this.changeClassForm).then(response=>{
            this.$modal.msgSuccess("转班成功");
            this.openChange = false;
            this.getList();
            this.getClassList();
          })
        }
      });
    },
    /** 添加跟踪提交按钮 */
    submitTeachTrackForm(){
      this.$refs["teachTrackForm"].validate(valid => {
        if(valid){
          addTrace(this.teachTrackForm).then(response=>{
            this.$modal.msgSuccess("添加成功");
            this.openTeachTrack = false;
            this.getList();
            this.getClassList();
          })
        }
      });
    },
    /** 加入重点关注提交按钮 */
    submitFocusForm(){
      this.$refs["focusForm"].validate(valid => {
        if(valid){
          addFocus(this.focusForm).then(response=>{
            this.$modal.msgSuccess("添加成功");
            this.openFocus = false;
            this.getList();
            this.getClassList();
          })
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除学生管理编号为"' + ids + '"的数据项？').then(function() {
        return delStudentManage(ids);
      }).then(() => {
        this.getList();
        this.getClassList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 状态修改按钮操作 */
    handleStatus() {
      this.reset();
      this.openUpdate = true;
      this.updateTitle = "状态修改"
    },
    /** 留级转班按钮操作 */
    handleChangeClass(row) {
      this.reset();
      const id = row.id || this.ids
      getStudentManage(id).then(response => {
        this.changeClassForm.studentId = response.data.id;
        this.changeClassForm.studentName = response.data.studentName;
        // this.changeClassForm = response.data;
        this.openChange = true;
        this.changeTitle = "留级转班"
      });
    },
    /** 添加教学跟踪按钮 */
    handleTeachTrack(row) {
      this.reset();
      const id = row.id || this.ids
      getStudentManage(id).then(response => {
        this.teachTrackForm.studentId = response.data.id;
        this.teachTrackForm.classId = response.data.classId;
        this.teachTrackForm.studentName = response.data.studentName;
        this.teachTrackForm.className = response.data.className;
        this.openTeachTrack = true;
        this.teachTrackTitle = "添加跟踪"
      });

    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/studentManage/export', {
        ...this.queryParams
      }, `studentManage_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
